<template>
    <div>
        <!-- 头部 -->
        <div class="Stop">
            <div class="StopO">
                <i @click="Sbackto()" class="Stfan"></i>
                <input class="StopOn" type="text" value="">
                <i class="Sshan" @click="Sdelete()"></i>
                <img class="StopOne" src="../../assets/user/top-search.png" alt="搜索">
                <p class="Stopmsg">搜索</p>
            </div> 
           
        </div>
    </div>
</template>

<script>
export default {
    name:'Sresulttop',
    data(){
        return{
            toptr:[false,false,false,false],
            txt:'',
            arr:[]
        }
    },
    methods:{
        Sbackto(){
            this.$router.replace('/');
        },
        Sdelete(){
            this.$router.replace('/search?name='+ this.txt);
        }
    },
    mounted(){
        var href = window.location.href.split('#')[1].split('?')[1].split('=')[1];
        this.txt = href;
        var StopOn = document.querySelector('.StopOn');
        StopOn.value = href;
        // if (!this.arr.includes(this.search_val)) {
        // this.arr.unshift(href);
        // localStorage.setItem("arr", JSON.stringify(this.arr));
    }
}
</script>

<style  scoped>

/* 头部 */
.Stop {
    background-color: #e53e42;
    width: 100%;
    height: 9.6rem;
    color: #fff;
    font-size: 3.6rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
}
.StopO {
    height:9.6rem;
    padding: 0 2rem;
    line-height: 9.6rem;
    text-align: left;
}
.StopOn {
    margin-left: 2.8rem;
    height: 4.8rem;
    width: 49.3rem;
    border-radius: 1rem;
    vertical-align: middle;
    margin-bottom: 1rem;
    padding-left: 4.7rem;
    font-size: 2.4rem;
    color: #e83d41;
}
.StopOne {
    position: absolute;
    z-index: 2;
    top: 50%;
    margin-top: -1.5rem;
    left: 8.5rem;
}
.Stopmsg {
    position: absolute;
    right: 2rem;
    top: 0;
    top: 2rem;
    margin-top: -1.9rem;
    line-height:9.6rem ;
}
/* < */
.Stfan {
    width: 2.5rem;
    height: 2.5rem;
    border-left: 0.2rem solid #fff;
    border-bottom: 0.2rem solid #fff;
    display: inline-block;
    transform: rotate(45deg);
}
/* 删除 */
.Sshan {
    width: 3rem;
    height: 3rem;
    background: url(../../assets/user/delete.png) no-repeat;
    position: absolute;
    top: 3.2rem;
    left: 57rem;
}
</style>